package org.bigdata.zc.mongo.repository;

import org.bigdata.zc.mongo.MatchScheduleWin;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.Date;
import java.util.List;

/**
 * Created by Stephen on 2017/10/30.
 */
public interface MatchScheduleRepository extends MongoRepository<MatchScheduleWin, Long> {
    List<MatchScheduleWin> findByCupId(String cupId);

    List<MatchScheduleWin> findByScheduleId(String scheduleId);

    @Query(value = "{'matchTime':{{'$gte':?1}}, {'matchTime':{'$lte':?2}}}")
    List<MatchScheduleWin> findByDate(Date start,Date end);
}
